package com.uzai.common.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 指令枚举
 * @Auther: jianghan
 * @Date: 2021/8/17 11:10
 * @Description:
 */
public enum UzaiCmdKeyEnum {

    /**
     * 全部订阅
     */
    ALL_SUBSCRIBE("all_subscribe","全部订阅"),
    /**
     * 全部退订
     */
    ALL_UNSUBSCRIBE("all_unsubscribe","全部退订"),



    /**
     * 订单付款订阅
     */
    ORDER_PAY_SUBSCRIBE("order_pay_subscribe","订单付款订阅"),
    /**
     * 订单付款退订
     */
    ORDER_PAY_UNSUBSCRIBE("order_pay_unsubscribe","订单付款退订"),
    /**
     * 订单失效订阅
     */
    ORDER_INVALID_SUBSCRIBE("order_invalid_subscribe","订单失效订阅"),
    /**
     * 订单失效退订
     */
    ORDER_INVALID_UNSUBSCRIBE("order_invalid_unsubscribe","订单失效退订"),
    /**
     * 订单结算订阅
     */
    ORDER_SETTLE_SUBSCRIBE("order_settle_subscribe","订单结算订阅"),
    /**
     * 订单结算退订
     */
    ORDER_SETTLE_UNSUBSCRIBE("order_settle_unsubscribe","订单结算退订"),



    /**
     * 提成-订单付款订阅
     */
    REWARD_ORDER_PAY_SUBSCRIBE("reward_order_pay_subscribe","提成-订单付款订阅"),
    /**
     * 提成-订单付款退订
     */
    REWARD_ORDER_PAY_UNSUBSCRIBE("reward_order_pay_unsubscribe","提成-订单付款退订"),
    /**
     * 提成-订单失效订阅
     */
    REWARD_ORDER_INVALID_SUBSCRIBE("reward_order_invalid_subscribe","提成-订单失效订阅"),
    /**
     * 提成-订单失效退订
     */
    REWARD_ORDER_INVALID_UNSUBSCRIBE("reward_order_invalid_unsubscribe","提成-订单失效退订"),
    /**
     * 提成-订单结算订阅
     */
    REWARD_ORDER_SETTLE_SUBSCRIBE("reward_order_settle_subscribe","提成-订单结算订阅"),
    /**
     * 提成-订单结算退订
     */
    REWARD_ORDER_SETTLE_UNSUBSCRIBE("reward_order_settle_unsubscribe","提成-订单结算退订"),



    /**
     * 群发消息订阅
     */
    BROAD_MSG_SUBSCRIBE("broad_msg_subscribe","群发消息订阅"),
    /**
     * 群发消息退订
     */
    BROAD_MSG_UNSUBSCRIBE("broad_msg_unsubscribe","群发消息退订"),


    /**
     * 用户信息明细查询
     */
    USER_INFO_DETAIL("user_info_detail","用户信息明细查询"),
    /**
     * 个人中心卡片获取
     */
    USER_INFO_CARD("user_info_card","个人中心卡片获取"),
    /**
     * 用户订单查询
     */
    USER_ORDER_QUERY("user_order_query","用户订单查询"),
    /**
     * 用户订单列表查询
     */
    USER_ORDER_LIST("user_order_list","用户订单列表"),
    /**
     * 机器人用户提现
     */
    ROBOT_USER_TAKE_BAL("robot_user_take_bal","机器人用户提现-微信自动转账"),

    /**
     * 机器人用户提现-微信红包
     */
    ROBOT_USER_TAKE_BAL_WX_REDPACKET("robot_user_take_bal_wx_redpacket","机器人用户提现-微信红包"),

    /**
     * 机器人用户提现-支付宝转账
     */
    ROBOT_USER_TAKE_BAL_ALIPAY("robot_user_take_bal_alipay","机器人用户提现-支付宝转账"),

    /**
     * 机器人用户提现-手动提现
     */
    ROBOT_USER_TAKE_BAL_HANDLE("robot_user_take_bal_handle","机器人用户提现-手动提现"),

    /**
     * 绑定支付宝
     */
    BIND_ALIPAY_ACCOUNT("bind_alipay_account","绑定支付宝"),
    /**
     * 设置为代理
     */
    SET_AGENT("set_agent","设置为代理"),
    /**
     * 启动社群
     */
    START_COMMUNITY("start_community","启动社群"),
    /**
     * 停止社群
     */
    STOP_COMMUNITY("stop_community","停止社群"),
    /**
     * 培训文案
     */
    TRAINING_TXT("training_txt","培训文案"),
    /**
     * 导购
     */
    SHOPPING_GUIDE("shopping_guide","导购"),
    /**
     * 签到
     */
    SIGN_IN("sign_in","签到"),
    /**
     * 机器人海报
     */
    WECHAT_POSTER("wechat_poster","机器人海报"),





    /**
     * 本地生活集合页
     */
    LOCAL_LIVE_VIEW("local_live_view","本地生活集合页"),
    /**
     * 美团
     */
    LOCAL_LIVE_MEITUAN("local_live_meituan","美团"),
    /**
     * 饿了么
     */
    LOCAL_LIVE_ELM("local_live_elm","饿了么"),



    /**
     * 免单商品列表
     */
    FREE_GOODS_LIST("free_goods_list","免单商品列表"),
    /**
     * 免单商品兑换
     */
    FREE_GOODS_GET("free_goods_get","免单商品兑换"),

    /**
     * 公众号二维码
     */
    WXPUB_QRCODE("wxpub_qrcode","公众号二维码"),

    /**
     * 机器人活码
     */
    ROBOT_QRCODE("robot_qrcode","机器人活码"),

    /**
     * 公众号海报
     */
    WXPUB_POSTER("wxpub_poster","公众号海报"),

    /**
     * 公众号用户提现
     */
    WXPUB_USER_TAKE_BAL("wxpub_user_take_bal","公众号用户提现"),


    /**
     * 悠聊设置-呼叫客服系统-关键词
     */
    UZAICHAT_CALL_KEYWORD("uzaichat_call_keyword","悠聊呼叫客服系统关键词"),


    /**
     * 拼多多插件-唤醒拼多多App-关键词
     */
    GUIDE_KEY_PDD("guide_key_pdd","引导触发拼多多APP关键词"),


    /**
     * 公众号互通插件--关注二维码 触发关键词
     */
    FOLLOW_QRCODE_KEYWORDS("follow_qrcode_keywords","关注二维码触发关键词"),

    /**
     * 互通设置-互通码触发指令
     */
    UNIONID_QUERY_CMD("unionid_query_cmd","互通设置-互通码触发指令"),





    ;

    private String key;
    private String desc;
    UzaiCmdKeyEnum(String key, String desc) {
        this.key = key;
        this.desc = desc;
    }
    public String getKey() {
        return key;
    }
    public String getDesc() {
        return desc;
    }

    public static UzaiCmdKeyEnum getByKey(String key) {
        if (StringUtils.isBlank(key)) {
            return null;
        }
        for (UzaiCmdKeyEnum type: UzaiCmdKeyEnum.values()) {
            if (type.getKey().equals(key)) {
                return type;
            }
        }
        return null;
    }

}
